package com.hsbc.manager.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.hsbc.entity.Role;

public interface RoleRepository extends JpaRepository<Role, Integer>{

	@Query(value="select r.* from bc_role r left join bc_admin_role ar on ar.role_id=r.id where ar.admin_id=?1",nativeQuery=true)
	List<Role> findByAdminId(int adminId);
}
